package com.lanchetech.dao;

import com.lanchetech.bean.request.BlogCollectPageReq;
import com.lanchetech.bean.vo.CommentNumVO;import com.lanchetech.entity.BlogCollect;
import org.apache.ibatis.annotations.Mapper;import org.apache.ibatis.annotations.Param;import java.util.List;

@Mapper
public interface BlogCollectMapper {
    int deleteByPrimaryKey(Long id);

    int insert(BlogCollect record);

    int insertSelective(BlogCollect record);

    BlogCollect selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(BlogCollect record);

    int updateByPrimaryKey(BlogCollect record);

    BlogCollect findOneByBlogIdAndUserId(@Param("blogId") Long blogId, @Param("userId") Long userId);

    int deleteByUserIdAndBlogId(@Param("userId") Long userId, @Param("blogId") Long blogId);

    List<BlogCollect> findAllByUserId(@Param("userId") Long userId);

    Long countByBlogId(@Param("blogId") Long blogId);

    List<CommentNumVO> findCollectNum(@Param("list") List<Long> collect);

    List<BlogCollect> findAllPage(BlogCollectPageReq req);

}